/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package testdrivendevelopment;

/**
 *
 * @author Paul Mallon
 */
public class Person {
    private String name;
    private int age;
    
    public Person(String name, int age){
    
       this.name = name;
       this.age = age; 
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the age
     */
    public int getAge() {
        return age;
    }

    /**
     * @param age the age to set
     */
    public void setAge(int age) {
        this.age = age;
    }
    
    public String reverseName(String name){
    
        if((null == name) || (name.length() <= 1)){
            
            return name;
        }
        
        return reverseName(name.substring(1)) + name.charAt(0);
        
    }

} 
